package com.itheima.demo1;

import java.util.ArrayList;
import java.util.HashMap;

public class Test3 {
    public static void main(String[] args) {

        ArrayList<String> at = new ArrayList<>();
        ArrayList<Character> at2 = new ArrayList<>();
        at.add("abc");
        at.add("bcd");

        String s="";
        for (int i = 0; i < at.size(); i++) {
            s=at.get(i)+s;
        }

        char[] chars = s.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            int count=0;
            if (at2.contains(chars[i])){
                continue;
            }
            at2.add(chars[i]);
            for (char aChar : chars) {
                if (chars[i]==aChar){
                    count++;
                }
            }
            System.out.println(chars[i]+"="+count);
        }
    }
}
